package src.origintrail;

import java.awt.Graphics;
import java.awt.Image;
import javax.swing.JPanel;

/**
 * A specialized panel
 * @author csmythe
 */
public class AnimationPanel extends JPanel{
    private Image baseImage;

    /**
     * A specialized panel constructor
     * @param baseImage a starting image
     */
    public AnimationPanel(Image baseImage) {
        this.baseImage = baseImage;
    }
    
    /**
     * Blank constructor
     */
    public AnimationPanel(){
        
    }

    /**
     * Paint component
     * @param g Graphics object
     */
    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        int x = 0;
        int y = 0;
        g.drawImage(baseImage, x, y, 640, 600, this);
    }

    /**
     * Setter
     * @param image new base image
     */
    public void setBaseImage(Image image) {
        baseImage = image;
    }
    
    
}
